<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cherry.js</title>
    <script src="../../Cherry.js"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    new CherryMain({
        app:"app",
        child:[
            new CHE_Container({
                child: [
                    new CHE_Text({
                        height:200,
                        width:300,
                        textAlign:"center",
                        lineAlign:"center",
                        ellipsis:true,
                        child: [
                            new CHE_TextItem({
                                name:"text",
                                text:"颜色",
                                colorStyle:{
                                    color:"#fa4895",
                                    size:16,   //字体大小
                                    bold:false, //是否加粗
                                    italic:false, //是否斜边
                                    disabled:false, //是否删除
                                },
                            }),
                            new CHE_TextItem({
                                text:"字体大小",
                                colorStyle:{
                                    color:"#48bbfa",
                                    size:16,   //字体大小
                                    bold:false, //是否加粗
                                    italic:false, //是否斜边
                                    disabled:false, //是否删除
                                },
                            }),
                        ]
                    })
                ]
            }),
            new CHE_Button({
                text:"修改文字",
                margin:5,
                methods:{
                    click:()=>{
                        $GET("#text").setText("修改后的文字修改后的文字修改后的文字修改后的文字修改后的文字");
                    }
                }
            }),
            new CHE_Button({
                text:"获取文字",
                margin:5,
                methods:{
                    click:()=>{
                        console.log($GET("#text").getText());
                    }
                }
            }),

            new CHE_Button({
                text:"设置文字样式 填入字典 参考参数colorStyle",
                margin:5,
                cookie:0,
                methods:{
                    click:(e,self)=>{
                        $GET("#text").setColorstyle({
                            color:"#80000b",
                            size:24,   //字体大小
                            bold:true, //是否加粗
                            italic:true, //是否斜边
                            disabled:true, //是否删除
                        })
                    }
                }
            }),
        ],
        Created:()=>{

        }
    });



</script>
</html>